home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / applic / ncsa / Mac / Telnet2.6 / prerelease / d4 / Telnet2.6.1d4.src.sit.hqx / Telnet 2.6.1d4 source / source / vs / wind.h < prev   
Encoding:
C/C++ Source or Header  |  1994-11-19  |  4.2 KB  |  126 lines

  1. /*
  2.  *        MacLook Window Management Data Structure Definition
  3.  */
  4.  
  5. #define    MAXKB    256            /* BYU mod */
  6.  
  7. #define PASTE_IN_PROGRESS    0x4000 /* BYU LSC */
  8.  
  9. //    The following are for the "active" field.
  10. #define    CNXN_NOTINUSE    -2
  11. #define    CNXN_DNRWAIT    -1
  12. #define    CNXN_ACTIVE         0
  13. #define    CNXN_OPENING     1
  14. #define    CNXN_ISCORPSE     2
  15. #define MHOPTS_BASE        37    // Base option for {my,his}opts (Authenticate)
  16.                             //  {my,his} opts should only be used for telnet options
  17.                             //  in the range starting at MHOPTS_BASE and limited
  18.                             //  by MHOPTS_SIZE. This saves memory.
  19. #define MHOPTS_SIZE        2    // Number of options supported in {my,his}opts
  20.  
  21. #define SLC_ARRAY_SIZE    18    // This should match the value of SLC_MAX from parse.h
  22.  
  23. struct WindRec {
  24. short    
  25.     vs,                /* virtual screen number */                    /* BYU 2.4.15 */
  26.     port,            /* TCP/IP port number */
  27.     active,            /* See above for definition of possible values */
  28.     enabled,        /* Are we currently enabled for receive? */
  29.  
  30.     vtemulation,    /* 0 = VT100, 1 = VT 220 */
  31.     bsdel,            /* backspace or delete is default */
  32.     eightbit,        /* eight bit font displayed (false is seven bit display */    /* BYU 2.4.9 */
  33.     national,        /* LU/MP: translation table to use for this connection */
  34.     arrowmap,        /* MAT: should we allow the arrow keys to be mapped?? */
  35.     showErrors,        /* show ALL errors if this is set */
  36.     pgupdwn,        /* JMB/MAT: should we have page up/down do local window movement? */
  37.     emacsmeta,        /* JMB/SMB:    should option key work as EMACS meta key? */
  38.     Xterm,            /* JMB/WNR:    should Xterm sequences be recognized? */
  39.     halfdup,        /* If true then half-duplex mode */
  40.     forcesave,        /* NCSA 2.5: force lines to be saved */
  41.     crmap,            /* BYU mod - CR's second byte is ... */
  42.  
  43.     tekclear,        /* Does tektronix (1) clear screen or (0) add window */
  44.     tektype,        /* -1 = TEK not allowed, 0 = 4014, 1 = 4105 */
  45.     curgraph,        /* Associated Tek drawing */
  46.  
  47.     maxscroll,        /* Requested amount of scroll back */
  48.     wrap,            /* whether vtwrap is set or not for this screen */
  49.     echo,            /* NOTE: this is backwards - I am echoing your chars */
  50.     ESscroll,        /* will Clear Screen Save Lines? */
  51.     termstate,        /* Emulation State (-1 is none, 0 is VT100) */
  52.                     /* = TEKTYPE, send data to VGwrite */
  53.                     /* = RASTYPE, send data to VRwrite */
  54.  
  55.     naws,            /* NCSA: will negotiate NAWS */
  56.     lineAllow,        /* allow linemode? */
  57.     Isga,            /* I am supressing go ahead */
  58.     Usga,            /* You are supressing go ahead */
  59.     Ittype,            /* I am sending terminal type negotiations.. */
  60.     telstate,        /* Telnet State */
  61.     timing,            /* True if waiting for timing mark */
  62.     substat,        /* Telnet Subnegot. State */
  63.     parseIndex,        /* save an index into the subnegotiation parsed data */
  64.  
  65.     portNum,        /* port number from the application save set */
  66.     kblen,            /* Pointer to next char in buffer to be used */
  67.     clientflags;    /* BYU mod - boolean flags for ftp client */
  68.  
  69. Str63
  70.     machine;        // Name of machine we are connecting to
  71.  
  72. Str32
  73.     answerback;        /* Message to send when server sends TERMTYPE Telnet option */
  74.  
  75. /*     The following are used during paste operations */
  76. short
  77.     outlen,            /* Length of text remaining to be pasted */
  78.     pastemethod,    /* 1 = All at once, 0 = in blocks of size pasteblock */
  79.     pastesize;        /* Size of paste "blocks" */
  80.     
  81. char
  82.     *outptr,        /* Pointer to next char to send */
  83.     **outhand;        /* Handle to text from the Paste */
  84.  
  85. long   
  86.     incount,        /* BYU LSC - Count of bytes into this port */
  87.     outcount;        /* BYU LSC - Count of bytes out this port */
  88. /* ---- */
  89.  
  90. short
  91.     lmode,            /* Current linemode MODE.  Currently support EDIT and TRAPSIG */
  92.     slc[SLC_ARRAY_SIZE+1];
  93.     
  94. char
  95.     TELstop,        /* Character for scrolling to stop */
  96.     TELgo,            /* Character for scrolling to go */
  97.     TELip,            /* Character for interrupt process */
  98.     kbbuf[MAXKB];    /* The keyboard buffer (echo mode ) */
  99.     
  100. GrafPtr 
  101.     wind;
  102.     
  103. Handle
  104.     myInitParams;    //    So we can look up stuff after we have DNS'd.
  105.  
  106. Ptr
  107.     aedata;
  108.  
  109. unsigned char
  110.     myopts[MHOPTS_SIZE],    // My telnet options. Warning: see MHOPTS_BASE
  111.     hisopts[MHOPTS_SIZE],    // His telnet options. Warning: see MHOPTS_BASE
  112.     parsedat[450];            // save the subnegotiation data here
  113.                             //   must be big enough for a Kerberos AP message
  114.  
  115. char
  116.     cannon[80];        // Cannonical hostname
  117.  
  118. Boolean
  119.     authenticate,    // true if authenticating connection wanted
  120.     encrypt;        // true if encrypting connection wanted
  121.  
  122. };
  123.  
  124. typedef struct WindRec WindRec, * WindRecPtr;
  125.  
  126.